package com.mf.entity;

import javax.persistence.*;
import java.io.Serializable;

/**
 * 规格图片表
 *
 * @author: Jiang Runqing
 * @date: 2018-09-09 10:20
 */
@Entity
@Table(name = "tp_spec_image")
public class SpecImage implements Serializable {

    @MapsId("specImageId")
    @AttributeOverrides({
            @AttributeOverride(name="goodsId",column = @Column(name = "goods_id")),
            @AttributeOverride(name="specImageId",column = @Column(name = "spec_image_id"))
    })
    private SpecImageId specImageId;

    private String src;

    public SpecImage(SpecImageId specImageId, String src) {
        this.specImageId = specImageId;
        this.src = src;
    }

    public SpecImage() {
    }

    @EmbeddedId
    public SpecImageId getSpecImageId() {
        return specImageId;
    }

    public void setSpecImageId(SpecImageId specImageId) {
        this.specImageId = specImageId;
    }

    public String getSrc() {
        return src;
    }

    public void setSrc(String src) {
        this.src = src;
    }


}
